/*调用aardio的访问*/
//import http from "../lib/ja-fetch";
export   function commonapi(url, getType, params){
    var data = {url:url};
    data.postdata = params ;
    data = JSON.stringify(data);
    return new Promise(function (resolve, reject) {
       let redata = external.ajax(data);
       if(redata ?? redata.code==1001){
           resolve(redata.data);
       }else{
           reject(redata.msg)
       }

    });
    
  }





/* 	
 *  取顶部导航数据
 */
export async function getHeadMent(params = {
	openid: null
}) {
	return await commonapi('HeadMent', 'POST', params)
}

/* 	
 *  取左侧导航数据
 */
export async function getNavbar(params = {
	openid: null
}) {
	return await commonapi('Navbar', 'POST', params)
}

